package netty.myDecoder;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

/**
 * @Description TODO
 * @Author 李龙平
 * @Date 2020/10/13 17:40
 */
public class MyLongTobyteDecoder extends MessageToByteEncoder<Long> {
    @Override
    protected void encode(ChannelHandlerContext channelHandlerContext, Long aLong, ByteBuf byteBuf) throws Exception {
        System.out.println("解码！！！");
        byteBuf.writeLong(aLong);
    }
}
